/**
 * @FileName: UrlWhiteList.java
 * @Author
 * @Description:
 * @Date 2016年1月20日 下午2:04:34
 * @CopyRight ZTE Corporation
 */
package cn.hpclub.server.util;

public class UrlWhiteList{
    /*
     * private volatile static UrlWhiteList instance = new UrlWhiteList();
     * private List<String> urlList;
     * 
     * 
     * private UrlWhiteList(){ urlList = new ArrayList<String>(); initUrlList();
     * }
     * 
     * public static UrlWhiteList getInstance(){ if(instance == null){
     * synchronized(UrlWhiteList.class){ if(instance == null){ instance = new
     * UrlWhiteList(); } } } return instance; }
     * 
     *//**
       * @Title: isInWhiteList
       * @Description:检查目标URL是否在白名单中
       * @param destUrl
       *            目标URL
       * @return boolean
       */
    /*
     * public boolean isInWhiteList(String destUrl){ for(String url : urlList){
     * if(destUrl.matches(url)){ return true; } } return false; }
     * 
     *//**
       * @Title: initUrlList
       * @Description:初始化白名单列表 void
       *//*
         * private void initUrlList(){ String urlWhiteList =
         * PropKit.use("serverConfig.properties").get("urlWhiteList");
         * if(StrKit.isBlank(urlWhiteList)){ return; }
         * 
         * String[] urls = urlWhiteList.split(","); for(String url : urls){
         * System.out.println("url=" + url); urlList.add("^" +
         * url.replaceAll("\\*", ".*")); } }
         */
}
